<?php
	include("scripts/connection.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Script-Type" content="text/javascript" />

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen, projection, tv" />
<!--[if lte IE 6]><link rel="stylesheet" type="text/css" href="css/style-ie.css" media="screen, projection, tv" /><![endif]-->
<link rel="stylesheet" href="css/style-print.css" type="text/css" media="print" />

<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />

<script type="text/JavaScript" src="script.js"></script>

<title>SDU</title>
</head>

<body>

<div id="wrapper">
		<?php
			include("header.php");
		?>
			<div id="content-box-left">
				<div id="content-box-left-in">
					<div class="paging" title="" align='center'>
						<div class="box">
						 <div id="box-in">
								<div class="article">
									<h2 align='center'>STUDENTS</h2>
										<table align="center" cellspacing='0' cellpadding='0'>
										<?php
											echo	"<tr><td style='width: 10%; border: solid white 3px; text-align:center;'><b>Name</b></td>";
											echo	"<td style='width: 10%; border: solid white 3px; text-align:center;'><b>Surname</b></td>";
											echo	"<td style='width: 10%; border: solid white 3px; text-align:center;'><b>Faculty</b></td>";
											echo	"<td style='width: 10%; border: solid white 3px; text-align:center;'><b>Group</b></td>";
											echo	"<td style='width: 10%; border: solid white 3px; text-align:center;'><b>Tick</b></td>";
											echo	"<td style='width: 10%; border: solid white 3px; text-align:center;'><b>Login</b></td></tr>";
											$result = mysql_query("SELECT * FROM students_register WHERE teacher_id = '".$_SESSION['user_id']."' ORDER BY faculty ASC; ");
											while($row = mysql_fetch_array($result))
											{
												echo	"<tr><td style='border: solid white 3px; text-align:center;'>".$row['name']."</td>";
												echo	"<td style='border: solid white 3px; text-align:center;'>".$row['surname']."</td>";
												echo	"<td style='border: solid white 3px; text-align:center;'>".$row['faculty']."</td>";
												echo	"<td style='border: solid white 3px; text-align:center;'>".$row['group']."</td>";
												echo	"<td style='border: solid white 3px; text-align:center;'>".$row['tick']."</td>";
												echo	"<td style='border: solid white 3px; text-align:center;'>".$row['login']."</td></tr>";
											}
										?>
										</table>
								</div>
							</div>
						</div>
						</div>
					</div>	
					
					</div>
						
				</div>
		</body>
</html>